package client

import (
	"k8s.io/client-go/kubernetes"
	"k8s.io/client-go/tools/clientcmd"
)

func CreateClientSet() (clientSet *kubernetes.Clientset, err error) {
	configPath := "/Users/yss/My-DevelopArea/GoProjects/1-cncfstudy/homework/1115/.kube/config"
	config, err := clientcmd.BuildConfigFromFlags("", configPath)
	if err != nil {
		panic(err.Error())
	}
	clientSet, err = kubernetes.NewForConfig(config)
	return
}
